package com.github.codemperor.core.logger.test.mr.logfile;

import com.github.codemperor.core.logger.BaseLogger;
import com.github.codemperor.core.logger.compute.Context;
import com.github.codemperor.core.logger.compute.IMapperStreamingFunction;

import java.util.List;

public class LogFileTestMapper implements IMapperStreamingFunction {
    @Override
    public void mapping(Object line, Context context) {
        List<String> lineList = BaseLogger.resolver((String) line);
        String ip = lineList.get(5);
        String api = lineList.get(6);

        context.map(ip, api);
    }
}
